From fedc33f7a838ed2e2ad7f47f4600753ac3e58ca9 Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Tue, 25 May 1993 21:20:08 +0000 Subject: [PATCH] (rmail-summary-mark-deleted): Check for end of buffer. Pass t as NOWARN when calling rmail-summary-goto-msg. --- lisp/mail/rmailsum.el | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index bccfc9eb8f4..d4b629d0a89 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -392,15 +392,16 @@ Deleted messages stay in the file until the \\[rmail-expunge] command is given." (rmail-summary-delete-forward t)) (defun rmail-summary-mark-deleted (&optional n undel) - (and n (rmail-summary-goto-msg n nil t)) - (let ((buffer-read-only nil)) - (skip-chars-forward " ") - (skip-chars-forward "[0-9]") - (if undel - (if (looking-at "D") - (progn (delete-char 1) (insert " "))) - (delete-char 1) - (insert "D"))) + (and n (rmail-summary-goto-msg n t t)) + (or (eobp) + (let ((buffer-read-only nil)) + (skip-chars-forward " ") + (skip-chars-forward "[0-9]") + (if undel + (if (looking-at "D") + (progn (delete-char 1) (insert " "))) + (delete-char 1) + (insert "D")))) (beginning-of-line)) (defun rmail-summary-mark-undeleted (n) -- 2.30.2